#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "relay.h"

int main(int argc, char** argv) {
    for(int i = 1; i < argc; i+=2) {
        if(i + 1 >= argc) {
            continue;
        }

        int fd1 = open(argv[i], O_RDWR);
        int fd2 = open(argv[i+1], O_RDWR);

        relay_addjob(fd1, fd2);
    }

    relay_wait();
    exit(0);
}